-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] 장소 검색 API 연동 #106
[feat] 장소 검색 API 연동 #106
Conversation
# Conflicts: # app/src/main/java/org/sopt/pingle/di/UseCaseModule.kt
# Conflicts: # app/src/main/java/org/sopt/pingle/di/DataSourceModule.kt # app/src/main/java/org/sopt/pingle/di/RepositoryModule.kt # app/src/main/java/org/sopt/pingle/di/ServiceModule.kt
…t-plan-location-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
하지은 그만 잘해 ㅋ ㅋㅋ
val keyHash = Utility.getKeyHash(this) | ||
Timber.tag("KeyHash").d(keyHash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 다시 주석 처리 해주세용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 제건데용.... 팀원 키해시 다 입력하면 코드 삭제하겠습니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지현언니만 안했티비 ㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
역시 지은님~~~ 잘 보고 따라하겠습니다!!
planLocationViewModel.planLocationListState.flowWithLifecycle(lifecycle).onEach { uiState -> | ||
when (uiState) { | ||
is UiState.Success -> { | ||
binding.rvPlanLocationList.adapter = planLocationAdapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 왜 여기있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버통신이 실패했다면 어댑터 연결도 해줄 필요가 없다고 생각했기 때문입니다! 성공한 경우에만 어댑터 연결을 해서 리소스를 줄여보았어요..(뇌피셜로ㅋㅋ)
with(binding) { | ||
rvPlanLocationList.visibility = View.VISIBLE | ||
layoutPlanLocationEmpty.visibility = View.INVISIBLE | ||
} | ||
} | ||
|
||
is UiState.Empty -> { | ||
with(binding) { | ||
rvPlanLocationList.visibility = View.INVISIBLE | ||
layoutPlanLocationEmpty.visibility = View.VISIBLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with 스코프함수를 두개 연속으로 사용하기 보다는 상위에서 한번만 사용하는게 좋을 것 같습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
와 미쳤다 스코프 함수 장인이시네염
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반영해서 수정하려고 했는데.. 걔를 최상단에 하니까 비지블 처리가 제대로 안돼요 ㅜㅜ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에서 리사이클러뷰 비지블 처리 지워버리니까 엠티뷰->검색뷰로 안 넘어가서 다시 추가했슴당;;ㅜ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
완 ㅋㅋ
when (planLocationList.isEmpty()) { | ||
true -> { | ||
_planLocationListState.emit(UiState.Empty) | ||
} | ||
|
||
false -> { | ||
_planLocationList.value = planLocationList | ||
_planLocationListState.emit(UiState.Success(planLocationList)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개인적인 생각으로 조건문이 Boolean이라면 when문 보다는 if else로 하는 것이 더 깔끔할 것 같다는 생각이 들어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 코틀린에만 when이 있어서 이걸 쓰구 싶음여 ㅋ
planLocationAdapter.currentList | ||
|
||
with(binding) { | ||
rvPlanLocationList.visibility = View.VISIBLE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리사이클러뷰는 비저블 처리가 필요없다고 하네용.. 하하
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
호호
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
후후.. 수정했습니다! 리사이클러뷰가 띄워졌다가 다시 empty뷰로 띄워줘야 하는 경우에는 invisible로 다시 바꿔줘야 해서 하나만 수정했슴요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋ 완
# Conflicts: # app/src/main/java/org/sopt/pingle/di/DataSourceModule.kt # app/src/main/java/org/sopt/pingle/di/RepositoryModule.kt # app/src/main/java/org/sopt/pingle/di/ServiceModule.kt # app/src/main/java/org/sopt/pingle/di/UseCaseModule.kt # app/src/main/java/org/sopt/pingle/presentation/ui/auth/AuthActivity.kt
when (uiState) { | ||
is UiState.Success -> { | ||
planLocationAdapter.submitList(uiState.data) | ||
planLocationAdapter.currentList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 왜 썼나염??
Related issue 🛠
Work Description ✏️
Screenshot 📸
XRecorder_11012024_215013.mp4
Uncompleted Tasks 😅
N/A
To Reviewers 📢
우헤헤^!^